From: Jeroen van der Heijden Date: Mon, 1 Oct 2018 15:26:32 +0000 (+0200) Subject: no posix_fadvice on apple X-Git-Tag: archive/raspbian/2.0.44-1+rpi1~1^2~3^2~8^2~48 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=2e626bbcfcfd03a578eb4cc89bb81ca0152c66e0;p=siridb-server.git no posix_fadvice on apple --- diff --git a/src/siri/db/buffer.c b/src/siri/db/buffer.c index bb3da76e..3a484a9b 100644 --- a/src/siri/db/buffer.c +++ b/src/siri/db/buffer.c @@ -136,11 +136,13 @@ int siridb_buffer_open(siridb_t * siridb) return -1; } +#ifndef __APPLE__ rc = posix_fadvise(buffer_fd, 0, 0, POSIX_FADV_RANDOM|POSIX_FADV_DONTNEED); if (rc) { log_warning("Cannot set advice for file access: '%s' (%d)", fn, rc); } +#endif return 0; }